package com.cx.service.impl;

import com.cx.mapper.CityMapper;
import com.cx.pojo.City;
import com.cx.service.CityService;
import com.cx.util.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class CityServiceImpl implements CityService {
    @Override
    public List<City> selectByProId(String proId) {
        SqlSession sqlSession = SqlSessionUtil.openSqlSession();
        CityMapper cityMapper = sqlSession.getMapper(CityMapper.class);
        List<City> cities = cityMapper.selectByProId(proId);
        sqlSession.close();
        return cities;
    }
}
